package com.applancer.nativecmsflip;

import com.applancer.provider.SystemBarTintManager;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class InfoActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_info);

		initial();
		execution();
	}

	private void initial() {

	}

	private void execution() {
		getActionBar().setIcon(R.drawable.ic_detail_feed_back);
		getActionBar().setHomeButtonEnabled(true);

		SystemBarTintManager tintManager = new SystemBarTintManager(this);
		tintManager.setStatusBarTintEnabled(true);
		tintManager.setNavigationBarTintEnabled(true);

		tintManager.setStatusBarTintResource(R.color.statusbar_bg);
		tintManager.setNavigationBarTintResource(R.color.actionbar_bg);
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
		overridePendingTransition(R.anim.slide_right_in, R.anim.slide_right_out);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.info, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		int id = item.getItemId();
		switch (id) {
		case android.R.id.home:
			onBackPressed();
			break;

		}

		return super.onOptionsItemSelected(item);
	}
}
